﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>frmae0</title>

    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../css/iconfont.css"/>
    <link rel="stylesheet" type="text/css" href="../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../css/auislide.css"/>
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>
    <link rel="stylesheet" href="../css/zhibo.css">

    <style>
        .empty {
            text-align: center;
            padding: 120px 0;
        }

        .molandi {
            width: 92%;
            margin: 0 auto;
            background-color: #fff;
            border-radius: 10px;
            overflow: hidden;
            margin-bottom: .3rem;
            box-shadow: 0px 3px 10px 0px rgba(0, 0, 0, 0.15);
            box-sizing: border-box;
            /* background: linear-gradient(to right,#ff5e3e 0,#ff1679 100%);*/
            box-shadow: 0px 6px 11px 1px rgba(255, 83, 106, 0.2);
        }

        /*测试UI*/
        .list-title-l-1 {
            float: left;
            padding: 0px 0px 0px 0.6rem;
        }

        .iconfont-1 {
            font-family: "iconfont" !important;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        .icon-zuirehotchunse-1:before {
            content: "\e836";
        }

        .aui-slide-wrap-1 {
            display: block;
            position: relative;
            list-style: none;
            margin: 0;
            padding: 0;
            height: 100%;
            /*   width: 100%;*/
            overflow: hidden;
        }
    </style>
</head>


<div id="aui-slide">
    <div id="slidebox" class="aui-slide-wrap"
         style="margin: 10px;border-radius:0.5rem;box-shadow:0.1rem 0.1rem 0.4rem rgba(99, 99, 99, 0.3);">


        <!--顶部横幅未加载完成时的提示-->
        <img id="bpic" src="../image/default_picture/default_banner.png" onClick="UnloadedCompleted()">
        <!--顶部横幅未加载完成时的提示-->


    </div>
    <div class="aui-slide-page-wrap"><!--分页容器--></div>
</div>
<div class="list-title">
    <div class="list-title-l">
        <span style="color:#444;font-size: 0.6rem"><i class="iconfont icon-zuirehotchunse"
                                                      style="color:#ff7600;font-size: 0.8rem"></i>热门推荐</span>
    </div>
    <div class="list-title-r" id="wzbox_top">

    </div>

</div>
</section>
</body>
<script type="text/x-dot-template" id="bannertpl">
    {{~ it.data : value : index }}
    <div class="aui-slide-node bg-dark"
         style="border-radius:0.5rem;box-shadow:0.1rem 0.1rem 0.4rem rgba(99, 99, 99, 0.3);" tapmode
         onclick="toBanner('{{= value. linkurl }}')">
        <img src="http://124.222.162.204:1002/{{= value. picurl }}"/>
    </div>
    {{~}}
</script>

<div class="molandi">
    <a class="aui-flex b-line">
        <div class="aui-flex-iphone">
            <img src="../image/app/dianying.png" alt="" id="m99">
        </div>
        <div class="aui-flex-box">
            <p>
                <em class="aui-group-three" id="m74">福利电影</em>
                <span onClick="vList88()"
                      style="float: right;color: #f5f5f5;font-size: 13px;background-color: red;border-radius:5px;padding: 3px">
                            <b>购买密码</b>
                        </span>
            </p>
            <h3 id="m75">大家都爱看，当下最热的限制级电影</h3>
            <p>
                <em class="aui-group-one" id="m76">限制级电影</em> <em class="aui-group-two" id="m77">热门福利</em>
            </p>
        </div>
        <div class="aui-flex-support" onClick="vList()" id="m78">去观看</div>
    </a>
    <a onClick="yinyue()" class="aui-flex b-line">
        <div class="aui-flex-iphone">
            <img src="../image/meng.png" alt="" id="m100">
        </div>
        <div class="aui-flex-box">
            <p>
                <em class="aui-group-three" id="m79"> 全网音乐</em>
            </p>
            <h3 id="m80">各类在线音乐 </h3>
            <p>
                <em class="aui-group-one" id="m81">实时更新</em> <em class="aui-group-two" id="m82">热门音乐</em>
            </p>

        </div>
        <div class="aui-flex-support" id="m83">听音乐</div>
    </a>
    <a onClick="douyin()" class="aui-flex b-line">
        <div class="aui-flex-iphone">
            <img src="../image/douying.png" alt="" id="m101">
        </div>
        <div class="aui-flex-box">
            <p>
                <em class="aui-group-three" id="m84"> 抖音快手</em>
            </p>
            <h3 id="m85">各类热门短视频 </h3>
            <p>
                <em class="aui-group-one" id="m86">实时更新</em> <em class="aui-group-two" id="m87">热门搞笑</em>
            </p>

        </div>
        <div class="aui-flex-support" id="m88">看视频</div>
    </a>
    <a onClick="gameList()" class="aui-flex b-line">
        <div class="aui-flex-iphone">
            <img src="../image/app/game.png" alt="" id="m102">
        </div>
        <div class="aui-flex-box">
            <p>
                <em class="aui-group-three" id="m89"> 游戏直播</em>
            </p>
            <h3 id="m90">各类游戏在线直播 </h3>
            <p>
                <em class="aui-group-one" id="m91">实时更新</em> <em class="aui-group-two" id="m92">知名主播</em>
            </p>

        </div>
        <div class="aui-flex-support" id="m93">去观看</div>
    </a>

    <a onClick="douyinList()" class="aui-flex ">
        <div class="aui-flex-iphone">
            <img src="../image/app/timg.jpg" alt="" id="m103">
        </div>
        <div class="aui-flex-box">
            <p>
                <em class="aui-group-three" id="m94"> 全网小说</em>
            </p>
            <h3 id="m95">免费小说在线观看</h3>
            <p>
                <em class="aui-group-one" id="m96">实时更新</em> <em class="aui-group-two" id="m97">全网火热</em>
            </p>

        </div>
        <div class="aui-flex-support" id="m98">去阅读</div>
    </a>

</div>
<!-- </div> -->

</body>
<script type="text/javascript">
</script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/doT.js"></script>
<script type="text/javascript" src="../script/auipullrefresh.js"></script>
<script type="text/javascript" src="../script/auislide.js"></script>
<script type="text/javascript" src="../script/auilazyload.js"></script>
<script type="text/javascript">
    var imgdz = '';
    var api_url = localStorage.getItem('api_url');

    /////  初始化执行   S /////
    /////  apiready  一打开就执行的 函数

    apiready = function () {
        getMdata();
        //下拉刷新
        api.setCustomRefreshHeaderInfo({
            bgColor: '#fff',
            images: [
                'widget://image/app/xiala/1.png',
                'widget://image/app/xiala/2.png',
                'widget://image/app/xiala/3.png',
                'widget://image/app/xiala/4.png',
                'widget://image/app/xiala/5.png',
                'widget://image/app/xiala/6.png',
                'widget://image/app/xiala/7.png',
                'widget://image/app/xiala/8.png',
            ],
            tips: {
                pull: '下拉刷新！',
                threshold: '松开立即刷新！',
                load: '正在刷新'
            }
        }, function () {
            //下拉刷新被触发，自动进入加载状态，使用 api.refreshHeaderLoadDone() 手动结束加载中状态
            setTimeout(function () {
                api.refreshHeaderLoadDone()
            }, 3000);
        });
        //下拉刷新
        getBanner();
        api.parseTapmode();
        api.ajax({
            url: api_url + '/login/login/imgad.html',
            method: 'get',
            data: {
                values: {
                    mike_key: localStorage.getItem('mike_key')
                }
            }
        }, function (ret, err) {
            if (ret) {
                //alert( JSON.stringify( ret ) );
                localStorage.setItem('fxpic1', ret.msg.fxpic1);
                localStorage.setItem('fxurl1', ret.msg.fxurl1);
                localStorage.setItem('fxpic2', ret.msg.fxpic2);
                localStorage.setItem('fxurl2', ret.msg.fxurl2);
                var bpic = $api.byId('bpic');
//        imgdz = ret.msg.picurl;
//        if (ret.msg.pic!='') {
//          bpic.src = ret.msg.pic;
//        }
//        document.getElementById("bpic").onclick = function(){ imgUrl(); };
            } else {

            }
        });
        new auiLazyload({
            errorImage: '../image/error-img.jpg'
        });

    }

    //请求自定义框的数据
    function getMdata() {
        api.ajax({
            url: 'http://124.222.162.204:1002/login/login/getMdata.html',
            method: 'get',
            data: {
                values: {
                    mike_key:localStorage.getItem('mike_key')
                }
            }
        }, function(ret, err) {
            if (ret){
                var m74 = $api.byId('m74');
                var m75 = $api.byId('m75');
                var m76 = $api.byId('m76');
                var m77 = $api.byId('m77');
                var m78 = $api.byId('m78');
                var m79 = $api.byId('m79');
                var m80 = $api.byId('m80');
                var m81 = $api.byId('m81');
                var m82 = $api.byId('m82');
                var m83 = $api.byId('m83');
                var m84 = $api.byId('m84');
                var m85 = $api.byId('m85');
                var m86 = $api.byId('m86');
                var m87 = $api.byId('m87');
                var m88 = $api.byId('m88');
                var m89 = $api.byId('m89');
                var m90 = $api.byId('m90');
                var m91 = $api.byId('m91');
                var m92 = $api.byId('m92');
                var m93 = $api.byId('m93');
                var m94 = $api.byId('m94');
                var m95 = $api.byId('m95');
                var m96 = $api.byId('m96');
                var m97 = $api.byId('m97');
                var m98 = $api.byId('m98');
                var m99 = $api.byId('m99');
                var m100 = $api.byId('m100');
                var m101 = $api.byId('m101');
                var m102 = $api.byId('m102');
                var m103 = $api.byId('m103');
                m74.innerHTML = ret.msg['m74'];
                m75.innerHTML = ret.msg['m75'];
                m76.innerHTML = ret.msg['m76'];
                m77.innerHTML = ret.msg['m77'];
                m78.innerHTML = ret.msg['m78'];
                m79.innerHTML = ret.msg['m79'];
                m80.innerHTML = ret.msg['m80'];
                m81.innerHTML = ret.msg['m81'];
                m82.innerHTML = ret.msg['m82'];
                m83.innerHTML = ret.msg['m83'];
                m84.innerHTML = ret.msg['m84'];
                m85.innerHTML = ret.msg['m85'];
                m86.innerHTML = ret.msg['m86'];
                m87.innerHTML = ret.msg['m87'];
                m88.innerHTML = ret.msg['m88'];
                m89.innerHTML = ret.msg['m89'];
                m90.innerHTML = ret.msg['m90'];
                m91.innerHTML = ret.msg['m91'];
                m92.innerHTML = ret.msg['m92'];
                m93.innerHTML = ret.msg['m93'];
                m94.innerHTML = ret.msg['m94'];
                m95.innerHTML = ret.msg['m95'];
                m96.innerHTML = ret.msg['m96'];
                m97.innerHTML = ret.msg['m97'];
                m98.innerHTML = ret.msg['m98'];
                m99.src = ret.msg['m99'];
                m100.src = ret.msg['m100'];
                m101.src = ret.msg['m101'];
                m102.src = ret.msg['m102'];
                m103.src = ret.msg['m103'];
            }else{
                api.alert({
                    msg: '数据加载中.耐心等待3秒..',
                    duration: 3000
                });
            }
        })
    }
    ///// *****某个请求提示框   具体用处不明   *******/////
    function playRadio() {
        api.hideProgress();
    }

    ///// *****某个请求提示框   具体用处不明   *******/////


    //////////////////////   打开APP时 获取Banner和图标  方法    DataLoading    定时     S //////////////////////

    //定时执行数据加载
    var timer = setInterval(function () {
        DataLoading();
    }, 3000)

    //判断是否服务器通信成功
    function DataLoading() {

        api.ajax({
            url: api_url + '/login/login/banben.html',
            method: 'get',
            data: {
                values: {
                    mike_key: localStorage.getItem('mike_key')
                }
            }
        }, function (ret, err) {
            if (ret) {
                getBanner();   //获取Banner
                //alert( JSON.stringify( ret ) );
                /*  关闭提示
                          api.toast({
                              msg: '数据已更新',
                              duration: 1000
                          });
                */

                clearInterval(timer); // 获取成功 清除定时器
            }
            /*else {
                     api.toast({
                         msg: '数据获取成功 当前为最新数据',
                         duration: 1000
                     });

                       //alert( JSON.stringify( err ) );
                   }
                   */
        });


    }

    //////////////////////   打开APP时 获取Banner和图标  方法    DataLoading    定时     E //////////////////////

    ///////访问轮播地址 方法    toBanner   S   ///////
    function toBanner(url) {

        if (url == '') {


            api.toast({
                msg: '(#^.^#) 暂无详情'
            });

        } else {


            //网络连接判断S


            api.ajax({
                url: api_url + '/login/login/banben.html',
                method: 'get',
                data: {
                    values: {
                        mike_key: localStorage.getItem('mike_key')
                    }
                }
            }, function (ret, err) {
                if (ret) {

                    //网络正常   跳转


                    /*
                    api.showProgress({
                        title: 'VIP登录中',
                        modal: false
                    });
              */
                    api.toast({
                        msg: '加载中'
                    });


                    api.openWin({
                        name: 'h5',
                        url: './h5.html',
                        pageParam: {
                            url: url
                        }
                    });


                } else {

                    //网络连接失败 进行提示
                    NetworkConnectionFailurePrompt();

                }


            });
//网络连接判断E

        }
    }

    ///////访问轮播地址 方法    toBanner   E   ///////


    //////////////////////    菜单导航获取  方法  getBanner  S  //////////////////////
    function getBanner() {
        var bannerid = $api.byId('slidebox');
        var bannertpl = $api.byId('bannertpl');

        api.ajax({
            url: api_url + '/login/login/banben.html',
            method: 'get',
            data: {
                values: {
                    mike_key: localStorage.getItem('mike_key')
                }
            }
        }, function (ret, err) {
            if (ret) {

                localStorage.setItem('user_advert', ret.banben);
                var advert = $api.byId('gonggao');
                advert.innerHTML = localStorage.getItem('user_advert');
                localStorage.setItem('jx_url1', ret.banben);

            } else {
                //alert( JSON.stringify( err ) );
            }
        });


        // 添加广告
        var uid = 0;
        if (localStorage.getItem('user_id') > 1) {
            uid = localStorage.getItem('user_id');
        }
        // end
        api.ajax({
            url: api_url + '/app/nav/index?uid=' + uid,
            method: 'get',
        }, function (ret, err) {
            if (ret) {
                //渲染模板
                var pagefn = doT.template(bannertpl.text);
                bannerid.innerHTML = pagefn(ret.banne);
//      alert( JSON.stringify( ret.banner ) );
                banNer();

            }
            /*  去掉无网络弹窗提示else {
                alert( '网络错误' );
                api.hideProgress();
            }
            */
        });
    }

    //////////////////////    菜单导航获取  方法  getBanner  E  //////////////////////
    function h5(url) {

        if (url == '') {

        } else {
            api.openWin({
                name: 'h5',
                url: './h5.html',
                pageParam: {
                    url: url
                }
            });
        }
    }


    //////////////////////    轮播图获取  方法  getNav  S  //////////////////////
    function getNav() {
        var zblid = $api.byId('zbl_list_f');
        var zbltpl = $api.byId('zblcattpl');
        var bannerid = $api.byId('slidebox');
        var bannertpl = $api.byId('bannertpl');


        // 添加广告
        var uid = 0;
        if (localStorage.getItem('user_id') > 1) {
            uid = localStorage.getItem('user_id');
        }
        // end
        api.ajax({
            url: api_url + '/app/nav/index?uid=' + uid,
            method: 'get',
        }, function (ret, err) {
            if (ret) {
                //渲染模板
                var pagefn = doT.template(bannertpl.text);
                bannerid.innerHTML = pagefn(ret.banner);
                banNer();
//        alert( JSON.stringify( ret ) );


            }
            /*  去掉无网络弹窗提示
            else {
                alert( '网络错误' );
                api.hideProgress();
            }
            */

        });
    }

    //验证登录
    function check_login() {
        ///判断是否登录
        var time = localStorage.getItem('user_time');
        var user_id = localStorage.getItem('user_id');
        var timestamp = Date.parse(new Date()) / 1000;
        if (user_id < 1) {
            api.toast({
                msg: '(ｷ｀ﾟДﾟ´)!!    你还没登陆！',
                duration: 1000
            });
            api.openWin({
                name: 'login',
                url: './login.html',
                delay: 1000
            });
            return false;
        }
        if (time < timestamp&&time!=-1) {
            VipExpiredHint();
            return false;
        }
        return true;
    }
    //////////////////////    轮播图获取  方法  getNav  E  //////////////////////


    //////////////////////   打开推荐影片播放页  方法         S //////////////////////
    function vList() {
        if ( check_login()){
            var dialogBox = api.require('dialogBox');
            dialogBox.input({
                keyboardType: 'default',
                texts: {
                    title: '福利密码验证',
                    placeholder: '输入密码',
                    leftBtnTitle: '取消',
                    rightBtnTitle: '验证密码'
                },
                styles: {
                    bg: '#fff',
                    corner: 10,
                    w: 300,
                    h: 130,
                    title: {
                        h: 18,
                        alignment: 'center',
                        size: 14,
                        color: '#000',
                        marginT: 20,
                    },
                    input: {
                        h: 25,
                        y: 30,
                        marginT: 15,
                        marginLeft: 10,
                        marginRight: 10,
                        textSize: 14,
                        textColor: '#000'
                    },
                    dividingLine: {
                        width: 0.5,
                        color: '#696969'
                    },
                    left: {
                        bg: 'rgba(0,0,0,0)',
                        color: '#007FFF',
                        size: 12,
                        h: 40
                    },
                    right: {
                        bg: 'rgba(0,0,0,0)',
                        color: '#007FFF',
                        size: 12,
                        h: 40
                    }
                }
            }, function (ret) {
                if (ret.eventType == 'right') {
                    var pwd = ret.text

                    if (pwd == '') {
                        api.alert({
                            msg: '(ｷ｀ﾟДﾟ´)!! 密码不能为空！',
                            duration: 5000
                        });
                    } else {
                        api.ajax({
                            url: api_url + '/login/login/fulimima.html',
                            method: 'get',
                            data: {
                                values: {
                                    pwd: pwd,
                                    uid: localStorage.getItem('user_id'),
                                    key: localStorage.getItem('mike_key'),
                                }
                            }
                        }, function (ret, err) {
                            if (ret) {
                                if (ret.code == 0) {
                                    var dialogBox = api.require('dialogBox');
                                    dialogBox.close({
                                        dialogName: 'input'
                                    });
                                    api.alert({
                                        msg: '(#^.^#) 恭喜~ 验证成功~！',
                                        duration: 5000
                                    });
                                    var delay = 0;
                                    if (api.systemType != 'ios') {
                                        delay = 300;
                                    }
                                    api.openWin({
                                        name: 'v_list_win',
                                        url: 'v_list_win.html',
                                        bounces: false,
                                        delay: delay,
                                        slidBackEnabled: true,
                                        vScrollBarEnabled: false,
                                    });
                                } else {
                                    //密码购买链接
                                    var fuli_url = ret.fuli_url;
                                    var dialogBox = api.require('dialogBox');
                                    dialogBox.alert({
                                        texts: {
                                            content: ret.msg,
                                            leftBtnTitle: '取消',
                                            rightBtnTitle: '购买密码'
                                        },
                                        styles: {
                                            bg: '#fff',
                                            w: 300,
                                            content: {
                                                color: '#000',
                                                size: 14
                                            },
                                            left: {
                                                marginB: 7,
                                                marginL: 20,
                                                w: 130,
                                                h: 35,
                                                corner: 2,
                                                bg: '#ff7600',
                                                color: '#fff',
                                                size: 14
                                            },
                                            right: {
                                                marginB: 7,
                                                marginL: 10,
                                                w: 130,
                                                h: 35,
                                                corner: 2,
                                                bg: '#ff7600',
                                                color: '#fff',
                                                size: 14
                                            }
                                        }
                                    }, function (ret) {
                                        if (ret.eventType == 'left') {
                                            var dialogBox = api.require('dialogBox');
                                            dialogBox.close({
                                                dialogName: 'alert'
                                            });
                                            api.toast({
                                                msg: '(ｷ｀ﾟДﾟ´)!!  取消操作！',
                                                duration: 1000
                                            });

                                        } else if (ret.eventType == 'right') {
                                            // api.toast({
                                            //     msg: '(ｷ｀ﾟДﾟ´)!!  你点了购买！',
                                            //     duration: 7000
                                            // });
                                            var dialogBox = api.require('dialogBox');
                                            dialogBox.close({
                                                dialogName: 'alert'
                                            });
                                            api.openWin({
                                                name: 'h5',
                                                url: './h5.html',
                                                pageParam: {
                                                    url: fuli_url
                                                }
                                            });
                                        }
                                    });


                                }

                            } else {
                                api.hideProgress();
                                api.toast({
                                    msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
                                    duration: 5000
                                });
                                return;
                            }
                        });
                    }
                }
                if (ret.eventType == 'left') {
                    var dialogBox = api.require('dialogBox');
                    dialogBox.close({
                        dialogName: 'input'
                    });
                    api.toast({
                        msg: '(ｷ｀ﾟДﾟ´)!!  取消操作！',
                        duration: 3000
                    });
                }
            });
        }


    }

    function vList88() {
        api.ajax({
            url: api_url + '/login/login/fulimima.html',
            method: 'get',
            data: {
                values: {
                    pwd: 'xx',
                    uid: localStorage.getItem('user_id'),
                    key: localStorage.getItem('mike_key'),
                }
            }
        }, function (ret, err) {
            if (ret) {
                if (ret.code == 1) {
                    //api.hideProgress();
                    api.openWin({
                        name: 'h5',
                        url: './h5.html',
                        pageParam: {
                            url: ret.fuli_url
                        }
                    });

                } else {
                    api.hideProgress();
                    api.toast({
                        msg: ret.msg,
                        duration: 3000
                    });
                    return;
                }

            } else {
                api.hideProgress();
                api.toast({
                    msg: '(ｷ｀ﾟДﾟ´)!!  网络错误 请检查！',
                    duration: 5000
                });
                return;
            }
        });
    }

    function vList_bf() {
        var delay = 0;
        if (api.systemType != 'ios') {
            delay = 300;
        }
        api.openWin({
            name: 'v_list_win',
            url: 'v_list_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function tvList() {
        var delay = 0;
        api.openWin({
            name: 'tv_list_win',
            url: 'tv_list_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function mnList() {
        var delay = 0;
        api.openWin({
            name: 'v_mn_win',
            url: 'v_mn_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }


    function zhiboList() {
        var delay = 0;
        api.openWin({
            name: 'zhibo_win',
            url: 'zhibo_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function gameList() {
        if(check_login()){
            var delay = 0;
            api.ajax({
                url:  'http://124.222.162.204:1002/login/login/youxiurl.html',
                method: 'get',
                data: {
                    values: {
                        moneyKey: 'woshimikewopashui',
                    }
                }
            }, function (ret, err) {
                if (ret) {
                    if (ret.code == 0) {
                        api.openWin({
                            name: 'login',
                            url: './login.html',
                            delay: 300
                        });
                        return;
                    } else if (ret.code == 1) {
                        var douyinurl=ret.msg;
                        api.openWin({
                            name: 'h5',
                            url: './h5.html',
                            pageParam: {
                                url: douyinurl
                            }
                        });
                    }

                } else {
                    alert('网络错误！');
                    return;
                }
            });
        };

    }


    function girlList() {
        var delay = 0;
        api.toast({
            msg: '暂时下线',
            duration: 5000
        });
    }

    function zhibo() {
        var delay = 0;
        api.openWin({
            name: 'zhibo',
            url: 'zhibo.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,

        });
    }

    //小说
    function douyinList() {
        if(check_login()){
            var delay = 0;
            api.ajax({
                url:  'http://124.222.162.204:1002/login/login/xiaoshuourl.html',
                method: 'get',
                data: {
                    values: {
                        moneyKey: 'woshimikewopashui',
                    }
                }
            }, function (ret, err) {
                if (ret) {
                    if (ret.code == 0) {
                        api.openWin({
                            name: 'login',
                            url: './login.html',
                            delay: 300
                        });
                        return;
                    } else if (ret.code == 1) {
                        var douyinurl=ret.msg;
                        api.openWin({
                            name: 'h5',
                            url: './h5.html',
                            pageParam: {
                                url: douyinurl
                            }
                        });
                    }

                } else {
                    alert('网络错误！');
                    return;
                }
            });
        };

    }

    //音乐
    function yinyue() {
        if(check_login()) {
            var delay = 0;
            // api.openWin({
            //     name: 'yinyue_win',
            //     url: 'yinyue_win.html',
            //     bounces: false,
            //     delay: delay,
            //     slidBackEnabled: true,
            //     vScrollBarEnabled: false,
            //
            // });
            api.ajax({
                url:  'http://124.222.162.204:1002/login/login/yinyueurl.html',
                method: 'get',
                data: {
                    values: {
                        moneyKey: 'woshimikewopashui',
                    }
                }
            }, function (ret, err) {
                if (ret) {
                    if (ret.code == 0) {
                        api.openWin({
                            name: 'login',
                            url: './login.html',
                            delay: 300
                        });
                        return;
                    } else if (ret.code == 1) {
                        var douyinurl=ret.msg;
                        api.openWin({
                            name: 'h5',
                            url: './h5.html',
                            pageParam: {
                                url: douyinurl
                            }
                        });
                    }

                } else {
                    alert('网络错误！');
                    return;
                }
            });

        }
    }

    //抖音
    function douyin() {
        if(check_login()) {
            var delay = 0;
            api.ajax({
                url:  'http://124.222.162.204:1002/login/login/douyinurl.html',
                method: 'get',
                data: {
                    values: {
                        moneyKey: 'woshimikewopashui',
                    }
                }
            }, function (ret, err) {
                if (ret) {
                    if (ret.code == 0) {
                        api.openWin({
                            name: 'login',
                            url: './login.html',
                            delay: 300
                        });
                        return;
                    } else if (ret.code == 1) {
                        var douyinurl=ret.msg;
                        api.openWin({
                            name: 'h5',
                            url: './h5.html',
                            pageParam: {
                                url: douyinurl
                            }
                        });
                    }

                } else {
                    alert('网络错误！');
                    return;
                }
            });
        }
    }

    function girlxiezhenList() {
        var delay = 0;
        api.openWin({
            name: 'v_mn_win',
            url: 'v_mn_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function fenlei() {
        var delay = 0;
        api.openWin({
            name: 'fenlei_win',
            url: 'fenlei_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }


    function zhibohezi() {
        var delay = 0;
        api.openWin({
            name: 'zhibo_win',
            url: 'zhibo_win.html',
            bounces: false,
            delay: delay,
            slidBackEnabled: true,
            vScrollBarEnabled: false,
        });
    }

    function openWin(name) {
        var time = localStorage.getItem('user_time');
        var user_id = localStorage.getItem('user_id');
        var username = localStorage.getItem('user_name');
        var timestamp = Date.parse(new Date()) / 1000;
        if (user_id < 1) {
            api.alert({
                title: '温馨提示',
                msg: '请先登陆后使用',
            });
            api.openWin({
                name: 'login',
                url: 'login.html',
                delay: 300
            });
            return;

        }

        if (time > timestamp) {


            var delay = 0;
            if (api.systemType != 'ios') {
                delay = 300;
            }
            api.openWin({
                name: '' + name + '',
                url: '' + name + '.html',
                delay: 800,
                bgColor: '#000000'
            });

        } else if (time < timestamp) {
            var dialogBox = api.require('dialogBox');
            dialogBox.alert({
                texts: {
                    content: '您的VIP会员已过期，请及时续费！',
                    leftBtnTitle: '在想想',
                    rightBtnTitle: '去开通'
                },
                styles: {
                    bg: '#fff',
                    w: 300,
                    content: {
                        color: '#000',
                        size: 14
                    },
                    left: {
                        marginB: 7,
                        marginL: 20,
                        w: 130,
                        h: 35,
                        corner: 2,
                        bg: '#ff7600',
                        color: '#fff',
                        size: 14
                    },
                    right: {
                        marginB: 7,
                        marginL: 10,
                        w: 130,
                        h: 35,
                        corner: 2,
                        bg: '#ff7600',
                        color: '#fff',
                        size: 14
                    }
                }
            }, function (ret) {
                if (ret.eventType == 'left') {
                    var dialogBox = api.require('dialogBox');
                    dialogBox.close({
                        dialogName: 'alert'
                    });
                } else if (ret.eventType == 'right') {
                    api.openWin({
                        name: 'open_vip_win',
                        url: './open_vip_win.html',
                        delay: 300
                    });
                    var dialogBox = api.require('dialogBox');
                    dialogBox.close({
                        dialogName: 'alert'
                    });
                }
            });
        }

    }


    //////////////////////    会员过期提示  方法  VipExpiredHint   S  //////////////////////
    function VipExpiredHint() {

        /*会员过期弹窗提示*/
        var dialogBox = api.require('dialogBox');
        dialogBox.alert({
            tapClose: true,  //描述：（可选项）是否点击遮罩层关闭该对话框  默认值：false
            texts: {
                content: '您的VIP会员已过期',
                leftBtnTitle: '在想想',
                rightBtnTitle: '去续费'
            },
            styles: {
                bg: '#fff',            //（可选项）字符串类型；对话框整体背景配置，支持#、rgb、rgba、img；默认：#fff
                corner: 10,             //（可选项）数字类型；对话框背景圆角大小；默认：2
                w: 300,                //（可选项）数字类型；对话框的宽；默认：300
                title: {                //（可选项）JSON对象；弹窗标题栏样式配置，不传则不显示标题区域
                    marginT: 20,       //（可选项）数字类型；标题栏与对话框顶端间距；默认：20
                    icon: 'widget://image/app/dialogBoxTisi.jpg',          //（可选项）字符串类型；标题前面的图标路径，要求本地路径（widget://、fs://）；图片为正方形的，如：50*50、100*100，建议开发者传大小合适的图片以适配高分辨率手机屏幕，不传则不显示
                    iconSize: 80,      //（可选项）数字类型；icon 图标边长大小,若 icon 不存在则此参数无效；默认：24
                    titleSize: 14,     //（可选项）数字类型；标题字体大小；默认：14
                    titleColor: '#000' //（可选项）字符串类型；标题字体颜色，支持#、rgb、rgba；默认：#fff
                },
                content: {              //（可选项）JSON 对象；文本内容配置，若不传则不显示该区域
                    marginT: 20,       //（可选项）数字类型；内容文本顶端与标题栏底端的距离，如果标题栏不存在，则是到窗口顶端的距离；默认：20
                    marginB: 40,       //（可选项）数字类型；内容文本底端与 left/right 顶端的距离，如果 left/right 都不存在，则是到对话框底端的距离；默认：20
                    color: '#ff0103',     //（可选项）字符串类型；内容文本字体颜色，支持 rgb、rgba、#；默认：#eee
                    size: 12           //（可选项）数字类型：内容文本字体大小；默认：12
                },
                left: {                 //（可选项）JSON 对象；左边按钮样式配置，不传则不显示左边按钮
                    marginB: 30,        //（可选项）数字类型；左边按钮的下边距；默认：7
                    marginL: 30,       //（可选项）数字类型；左边按钮的左边距；默认：20
                    w: 100,            //（可选项）数字类型；左边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；左边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；左边按钮圆角半径；默认：0.0
                    bg: '#3d3d3d',        //（可选项）字符串类型；左边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；左边按钮标题字体颜色，支持rgb，rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；左边按钮标题字体大小；默认：12
                },
                right: {               //（可选项）JSON 对象；右边按钮样式配置，不传则不显示右边按钮
                    marginB: 30,        //（可选项）数字类型；右边按钮的下边距；默认：7
                    marginL: 40,      //（可选项）数字类型；右边按钮左边距；默认：10
                    w: 100,            //（可选项）数字类型；右边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；右边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；右边按钮圆角半径；默认：0.0
                    bg: '#ff0103',        //（可选项）字符串类型；右边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；右边按钮标题字体颜色，支持rgb、rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；右边按钮标题字体大小；默认：12
                }
            }
        }, function (ret) {
            if (ret.eventType == 'left') {
                var dialogBox = api.require('dialogBox');
                dialogBox.close({
                    dialogName: 'alert'
                });
            } else if (ret.eventType == 'right') {
                api.openWin({
                    name: 'open_vip_win',
                    url: './open_vip_win.html',
                    delay: 300
                });
                var dialogBox = api.require('dialogBox');
                dialogBox.close({
                    dialogName: 'alert'
                });
            }
        });
        /*    会员过期弹窗提示结束    */

    }

    //////////////////////    会员过期提示 方法 VipExpiredHint  E  //////////////////////


    //////////////////////    网络连接失败提示  方法  NetworkConnectionFailurePrompt   S  //////////////////////
    function NetworkConnectionFailurePrompt() {

        /*无网络弹窗提示*/
        var dialogBox = api.require('dialogBox');
        dialogBox.alert({
            tapClose: false,  //描述：（可选项）是否点击遮罩层关闭该对话框  默认值：false
            texts: {
                content: '请检查网络是否顺畅',
                leftBtnTitle: '先不管',
                rightBtnTitle: '网络设置'
            },
            styles: {
                bg: '#fff',            //（可选项）字符串类型；对话框整体背景配置，支持#、rgb、rgba、img；默认：#fff
                corner: 10,             //（可选项）数字类型；对话框背景圆角大小；默认：2
                w: 300,                //（可选项）数字类型；对话框的宽；默认：300
                title: {                //（可选项）JSON对象；弹窗标题栏样式配置，不传则不显示标题区域
                    marginT: 20,       //（可选项）数字类型；标题栏与对话框顶端间距；默认：20
                    icon: 'widget://image/app/dialogBoxTisi.jpg',          //（可选项）字符串类型；标题前面的图标路径，要求本地路径（widget://、fs://）；图片为正方形的，如：50*50、100*100，建议开发者传大小合适的图片以适配高分辨率手机屏幕，不传则不显示
                    iconSize: 80,      //（可选项）数字类型；icon 图标边长大小,若 icon 不存在则此参数无效；默认：24
                    titleSize: 14,     //（可选项）数字类型；标题字体大小；默认：14
                    titleColor: '#000' //（可选项）字符串类型；标题字体颜色，支持#、rgb、rgba；默认：#fff
                },
                content: {              //（可选项）JSON 对象；文本内容配置，若不传则不显示该区域
                    marginT: 20,       //（可选项）数字类型；内容文本顶端与标题栏底端的距离，如果标题栏不存在，则是到窗口顶端的距离；默认：20
                    marginB: 40,       //（可选项）数字类型；内容文本底端与 left/right 顶端的距离，如果 left/right 都不存在，则是到对话框底端的距离；默认：20
                    color: '#ff0103',     //（可选项）字符串类型；内容文本字体颜色，支持 rgb、rgba、#；默认：#eee
                    size: 12           //（可选项）数字类型：内容文本字体大小；默认：12
                },
                left: {                 //（可选项）JSON 对象；左边按钮样式配置，不传则不显示左边按钮
                    marginB: 30,        //（可选项）数字类型；左边按钮的下边距；默认：7
                    marginL: 30,       //（可选项）数字类型；左边按钮的左边距；默认：20
                    w: 100,            //（可选项）数字类型；左边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；左边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；左边按钮圆角半径；默认：0.0
                    bg: '#3d3d3d',        //（可选项）字符串类型；左边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；左边按钮标题字体颜色，支持rgb，rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；左边按钮标题字体大小；默认：12
                },
                right: {               //（可选项）JSON 对象；右边按钮样式配置，不传则不显示右边按钮
                    marginB: 30,        //（可选项）数字类型；右边按钮的下边距；默认：7
                    marginL: 40,      //（可选项）数字类型；右边按钮左边距；默认：10
                    w: 100,            //（可选项）数字类型；右边按钮的宽；默认：130
                    h: 40,             //（可选项）数字类型；右边按钮的高；默认：35
                    corner: 10,         //（可选项）数字类型；右边按钮圆角半径；默认：0.0
                    bg: '#ff0103',        //（可选项）字符串类型；右边按钮的背景，支持rgb、rgba、#、img；默认：'#e0e'
                    color: '#fff',  //（可选项）字符串类型；右边按钮标题字体颜色，支持rgb、rgba、#；默认：'#007FFF'
                    size: 12           //（可选项）数字类型；右边按钮标题字体大小；默认：12
                }
            }
        }, function (ret) {
            if (ret.eventType == 'left') {
                var dialogBox = api.require('dialogBox');
                dialogBox.close({
                    dialogName: 'alert'
                });
            } else if (ret.eventType == 'right') {


                var openset = api.require('openSet');
                openset.open({
                    id: 1
                });


                var dialogBox = api.require('dialogBox');
                dialogBox.close({
                    dialogName: 'alert'
                });
            }
        });
        /*    无网络弹窗提示结束    */

    }

    //////////////////////    网络连接错误提示 方法 NetworkConnectionFailurePrompt  E  //////////////////////


    //////////////////////    菜单导航获取  方法  getBanner  S  //////////////////////
    function getBanner() {
        var bannerid = $api.byId('slidebox');
        var bannertpl = $api.byId('bannertpl');

        api.ajax({
            url: api_url + '/login/login/banben.html',
            method: 'get',
            data: {
                values: {
                    mike_key: localStorage.getItem('mike_key')
                }
            }
        }, function (ret, err) {
            if (ret) {

                localStorage.setItem('user_advert', ret.banben);
                var advert = $api.byId('gonggao');
                advert.innerHTML = localStorage.getItem('user_advert');
                localStorage.setItem('jx_url1', ret.banben);

            } else {
                //alert( JSON.stringify( err ) );
            }
        });


        // 添加广告
        var uid = 0;
        if (localStorage.getItem('user_id') > 1) {
            uid = localStorage.getItem('user_id');
        }
        // end
        api.ajax({
            url: api_url + '/app/nav/index?uid=' + uid,
            method: 'get',
        }, function (ret, err) {
            if (ret) {
                //渲染模板
                var pagefn = doT.template(bannertpl.text);
                bannerid.innerHTML = pagefn(ret.banne);
//      alert( JSON.stringify( ret.banner ) );
                banNer();

            }
            /*  去掉无网络弹窗提示else {
                alert( '网络错误' );
                api.hideProgress();
            }
            */
        });
    }

    //////////////////////    菜单导航获取  方法  getBanner  E  //////////////////////


    //////////////////////    轮播图获取  方法  getNav  S  //////////////////////
    function getNav() {
        var navid = $api.byId('zbl_list_f');
        var navtpl = $api.byId('navcattpl');


        // 添加广告
        var uid = 0;
        if (localStorage.getItem('user_id') > 1) {
            uid = localStorage.getItem('user_id');
        }
        // end
        api.ajax({
            url: api_url + '/app/nav/index?uid=' + uid,
            method: 'get',
        }, function (ret, err) {
            if (ret) {
                //渲染模板
                var pagefn = doT.template(navtpl.text);
                navid.innerHTML = pagefn(ret.banner);
                var pagefn = doT.template(navtjtpl.text);
                navtjid.innerHTML = pagefn(ret.banne);
//        alert( JSON.stringify( ret ) );


            }
            /*  去掉无网络弹窗提示
            else {
                alert( '网络错误' );
                api.hideProgress();
            }
            */

        });
    }

    //////////////////////    轮播图获取  方法  getNav  E  //////////////////////


    //////////////////////    幻灯轮播图获取  方法  banNer  S  //////////////////////
    function banNer() {
        var slide = new auiSlide({
            container: document.getElementById("aui-slide"),
            // "width":300,
            "height": 150,
            "speed": 300,
            "pageShow": true,
            "autoPlay": 5000,
            "pageStyle": 'dot',
            "loop": true,
            'dotPosition': 'center',
        });
    }

    new auiLazyload({
        errorImage: '../image/error-img.jpg'
    });


    ////////////手动开始下拉刷新的加载状态 方法  fnRefreshHeaderLoading   S   ////////////
    function fnRefreshHeaderLoading() {
        api.refreshHeaderLoading();
    };
    ////////////手动开始下拉刷新的加载状态 方法  fnRefreshHeaderLoading   E   ////////////


</script>


</html>
